// 封裝分类页面数据请求接口
import type { CategoryTopItem } from '@/types/category'
import type { BannerItem } from '@/types/home'
import { http } from '@/utils/https'

// 分类页面轮播图
export const getBanner = (distributionSite: number) => {
  return http<BannerItem[]>({
    url: '/home/banner',
    method: 'GET',
    data: {
      distributionSite,
    },
  })
}

// 获取一级分类
export const getFirstCategory = () => {
  return http<CategoryTopItem[]>({
    url: '/category/top',
    method: 'GET',
  })
}
